﻿using NHibernate;
using Odn.Infrastructure;

namespace Niusys.Repostories
{
    public class BaseRepository
    {
        public BaseRepository()
        {

        }

        private ISession _session;
        public ISession Session
        {
            get
            {
                if (_session == null)
                {
                    _session = EngineContext.Current.Resolve<ISessionManager>().OpenSession();
                }
                return _session;
            }
        }
    }
}